package cmd

import (
	"github.com/chromedp/chromedp"
)

func _commonChromeFlags() []func(*chromedp.ExecAllocator) {
	return append(
		chromedp.DefaultExecAllocatorOptions[:],
		chromedp.NoFirstRun,
		chromedp.NoDefaultBrowserCheck,
		chromedp.DisableGPU,
		chromedp.NoSandbox,
	)
}

func markChromeDpFlags() []func(*chromedp.ExecAllocator) {
	flags := _commonChromeFlags()
	if isDebug {
		flags = append(flags, chromedp.Flag("headless", false))
	}
	return flags
}